import mockRequest from '@/utils/mockRequest';

export interface CategoryType {
  id?: number;
  superCategoryId?: number;
  showIndex?: 3;
  name?: string;
  frontName?: string;
  frontNameIcon?: null;
  frontDesc?: string;
  bannerUrl?: null;
  bannerList?: null;
  iconUrl?: null;
  imgUrl?: null;
  level?: string;
  subCateList?: [];
  wapBannerUrl?: string;
  type?: number;
  wapExpandPicTargetUrl?: null;
  categoryType?: number;
  extra?: null;
}
export type categoryListType = CategoryType[];
export type CategoryGroupType = {
  id?: number;
  name?: string;
  categoryList?: categoryListType;
};
export type CategoryL1Type = {
  id?: number;
  name?: string;
  bannerUrl?: string;
  categoryGroupList?: CategoryGroupType[];
};
export type CategoryL1ListType = CategoryL1Type[];
type mockRequestCatagoryListData = {
  data: {
    code: number;
    data: {
        categoryL1List:CategoryL1ListType;
    }
  };
};
export default {
  reqCategoryList() {
    return mockRequest.get<any, mockRequestCatagoryListData>('/categoryList');
  },
};
